<div class="layui-form" lay-filter="layPopup" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>选择分组</label>
        <div class="layui-input-block">
            <div id="sysConfigLAYView"></div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>变量名</label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" lay-verify="required|varName" name="name" placeholder="请输入变量名"
                   type="text" value="">
            <p class="required_class">*变量名不能为select和file，已被框架占用</p>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>变量标题</label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" lay-verify="required" name="title" placeholder="请输入变量标题"
                   type="text" value="">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">提示信息</label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" name="tip" placeholder="请输入提示信息"
                   type="text" value="">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>变量类型</label>
        <div class="layui-input-block">
            <div id="sysConfigLAYTypeView"></div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">验证规则</label>
        <div class="layui-input-block">
            <div id="sysConfigLAYRuleView"></div>
        </div>
    </div>

    <div class="layui-form-item" id="configContentDiv">
        <label class="layui-form-label">字典数据</label>
        <div class="layui-input-block">
            <textarea class="layui-textarea" name="content" placeholder="一行一个，无需引号，比如：key1=value1"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">默认值</label>
        <div class="layui-input-block">
            <input type="text" name="value" value="" placeholder="请输入默认值"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">扩展属性</label>
        <div class="layui-input-block">
            <textarea class="layui-textarea" name="extend"
                      placeholder="一行一个属性，无需引号，比如：class=config-item"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">权重</label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" name="weigh" placeholder="请输入权重"
                   type="text" value="">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-block">
            <input class="layui-btn" lay-filter="laySubmitAdd" lay-submit type="button" value="确认">
        </div>
    </div>
</div>

<script id="sysConfigLAYTpl" type="text/html">
    <!-- 配置分组 -->
    <select name="group" lay-verify="required" lay-search>
        <option value="">请选择分组</option>
        {{# layui.each(d.groupList, function(index, item){ }}
        <option value="{{item.name}}">{{ item.title }}</option>
        {{# }); }}
    </select>
</script>

<script id="sysConfigLAYType" type="text/html">
    <!-- 变量类型 -->
    <select name="type" lay-verify="required" lay-search lay-filter="configType">
        <option value="">请选择变量类型</option>
        {{# layui.each(d.typeList, function(index, item){ }}
        <option value="{{item.name}}">{{ item.name }} - {{item.desc}}</option>
        {{# }); }}
    </select>
</script>

<script id="sysConfigLAYRule" type="text/html">
    <!-- 验证规则 -->
    <select name="rule" lay-search>
        <option value="">请选择验证规则</option>
        {{# layui.each(d.ruleList, function(index, item){ }}
        <option value="{{item.name}}">{{ item.desc }}</option>
        {{# }); }}
    </select>
</script>

<script lay-done="layui.data.sendParams(d.params)" template type="text/html"></script>
<script src="../web/res/js/systemConfig/config/other.js"></script>
